#!/bin/bash
system_url=/etc/profile.d/reboot2.sh
res_url=/home/sietium/env/reboot_num.txt
file=$(cd "$(dirname "$0")";pwd)
reboot_num = 500	#需要重复开关机的次数
m=$(cat ${res_url} | wc -l)
if (($m < $reboot_num));then 
	echo 1	>> ${res_url}
	shutdown -r
elif (($m >= $reboot_num)); then
	sudo rm $system_url
	shutdown -r
fi
